package cn.edu.wtbu.wtbu_music_server.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 
 * @TableName user
 */
@Schema(description = "用户对象")
@TableName(value ="user")
@Data
public class User implements Serializable {
    /**
     * 
     */
    @Schema(description = "用户id",example = "1")
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 
     */
    @Schema(description = "用户名", example = "admin")
    private String username;

    /**
     * 
     */
    @Schema(description = "密码", example = "123456")
    private String password;

    /**
     * 
     */
    @Schema(description = "注册时间", example = "2024-01-01 12:11:10")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime regtime;

    /**
     * 
     */
    @Schema(description = "账号状态", example = "0",allowableValues = "0,1")
    private Integer status;

    /**
     * 
     */
    @Schema(description = "手机号", example = "18988866645")
    private String phone;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}